package com.xxg.renrenshop.service;

import com.xxg.renrenshop.cache.ShopCache;
import com.xxg.renrenshop.domain.query.GetShopListQuery;
import com.xxg.renrenshop.domain.result.BaseResult;
import org.springframework.stereotype.Service;

/**
 * 商户商品接口实现
 *
 * @author xuxiaogang
 * @date 2021-11-17
 */
@Service
public class ShopServiceImpl implements ShopService {
    private final ShopCache shopCache;

    public ShopServiceImpl(ShopCache shopCache) {
        this.shopCache = shopCache;
    }

    @Override
    public BaseResult getShopProduct(GetShopListQuery query) {
        return new BaseResult(shopCache.queryCache(query.getPageNo()));
    }
}
